package com.bite.user.convert;

import com.bite.common.utils.SecurityUtil;
import com.bite.user.api.pojo.UserRegisterRequest;
import com.bite.user.dataobject.UserInfo;

public class BeanConvert {
    public static UserInfo registerConvertByEncrypt(UserRegisterRequest param) {
        UserInfo userInfo = new UserInfo();
        userInfo.setUserName(param.getUserName());
        userInfo.setPassword(SecurityUtil.encrypt(param.getPassword()));
        userInfo.setGithubUrl(param.getGithubUrl());
        userInfo.setEmail(param.getEmail());
        return userInfo;
    }
}
